import request from '../request'

// 查看饮食称重合计
export function findDietWeighingTotal(params) {
  return request({
    url: '/total-treatment-diet-weighting/findDietWeighingTotal',
    method: 'POST',
    data: params
  })
}

export function deleteTotalItem(params) {
  return request({
    url: `/total-treatment-diet-weighting/delete/${params.id}`,
    method: 'DELETE',
    params
  })
}

export function saveOrUpdateDietWeighingTotal(params) {
  return request({
    url: '/total-treatment-diet-weighting/saveOrUpdateDietWeighingTotal',
    method: 'POST',
    data: params
  })
}

export function exportDietWeightTotals(params) {
  return request({
    url: '/total-treatment-diet-weighting/exportDietWeightTotals',
    method: 'GET',
    params,
    responseType: 'blob'
  })
}

export function findDietWeighingTotalNew(params) {
  return request({
    url: '/total-weighting/findDietWeighingTotal',
    method: 'POST',
    data: params
  })
}

export function saveOrUpdateDietWeighingTotalNew(params) {
  return request({
    url: '/total-weighting/saveOrUpdateDietWeighingTotal',
    method: 'POST',
    data: params
  })
}

export function exportDietWeightTotalsNew(params) {
  return request({
    url: '/total-weighting/exportDietWeightTotals',
    method: 'GET',
    params,
    responseType: 'blob'
  })
}
